package br.com.arg.aplica.model;

import java.io.Serializable;


import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

@Entity
@XmlRootElement
//@Table(name="CAMPO", uniqueConstraints = @UniqueConstraint(columnNames = {"formato", "nome"}))
public class Dominio implements Serializable {
	/** Default value included to remove warning. Remove or modify at will. **/
	private static final long serialVersionUID = 1L;
	
	public Dominio()
	{
		this.value = "M";
		this.descricao = "Masculino";
	}
	
	@Id
	@NotNull
	@GeneratedValue
	private int id;

	@NotNull
	@Size(min = 1, max = 32)
	private String value;

	@NotNull
	@Size(min = 1, max = 255)
	private String descricao;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public String getDescricao() {
		return descricao;
	}

	public void setDescricao(String descricao) {
		this.descricao = descricao;
	}	
}
